<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%request.setAttribute("ctx",request.getContextPath()); %>

<%@ taglib prefix="rbac" uri="http://www.ebayAdmin.com/rbac"%>

<html>
<head>
<link href="${ctx}/extend/css/style.css" rel="stylesheet" type="text/css"/>
<script src="${ctx}/extend/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/extend/js/dutil/DUtil.js" type="text/javascript"></script>
<script src="${ctx}/extend/css/css.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css"/>
<script src="${ctx}/js/common.js" type="text/javascript"></script>
<s:head theme="xhtml"/>
<sx:head parseContent="true"/> 

<style>
table.dclass_data td, table.dclass_data th {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    width: 75px;
	word-wrap:break-word;
	word-break:break-all;
	overflow:hidden;
}

table td.long_width, table th.long_width {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    width: 250px;
	word-wrap:break-word;
	word-break:break-all;
	overflow:hidden;
}

div.fixedLength1 {
    width: 93px;
}

div.fixedLength2 {
    width: 179px;
}
/*
div.fixedLength3 {
    width: 100px;
}

div.assetsNumLength {
    width: 95px;
}

div.modifyResultLength {
    width: 150px;
}*/

th {
    border: 1px solid #9FD6FF;
    padding: 0.5em 0.3em;
    width: 75px;
}

td {
    color: #064E88;
    font-family: 宋体;
    font-size: 11px;
    line-height: 18px;
    width: 75px;
}
</style>
<title>invoice query</title>
	<script type="text/javascript">

    function viewDetail(mdId) {
    	//var road = parseInt(Math.random()*1000000);
    	//window.open('${ctx}/admin/modifyRecord?id='+mdId+'&random='+road, "md_view",  "width=1000,height=750,top=6,left=10,scrollbars=auto");
    	var reMdForm=document.getElementById("listReForm");
       	reMdForm.action="${ctx}/admin/modifyRecord?id=" +mdId ;
        reMdForm.submit();
    }
	
	
   function doFresh() {
        if (getFresh()){
        	document.forms[0].submit();
        } 
    }

   function checkAll(name)
   {
   	var el = document.getElementsByTagName('input');
   	var len = el.length;
   	for(var i=0; i<len; i++)
   	{
   		if((el[i].type=="checkbox") && (el[i].name==name))
   		{
   			el[i].checked = true;
   		}
   	}
   }
   function clearAll(name)
   {
   	var el = document.getElementsByTagName('input');
   	var len = el.length;
   	for(var i=0; i<len; i++)
   	{
   		if((el[i].type=="checkbox") && (el[i].name==name))
   		{
   			el[i].checked = false;
   		}
   	}
   }
   
   function delSelect(){
  		
			var reMdForm=document.getElementById("listReForm");
	       	reMdForm.action="${ctx}/admin/delSelectRe";
	        reMdForm.submit();
     
   }
   
   function filterListRe(){
 		
		var reMdForm=document.getElementById("filterFomr");
      	reMdForm.action="${ctx}/admin/listRe";
       reMdForm.submit();

}
   	function test(){
   		alert("kao kao");
   	}
	function showField(fieldName){
	}
	
	/* Added by Doug */
	function returnBack(){
 		
		var reBKForm=document.getElementById("emptyForm");
		reBKForm.action="${ctx}/admin/filterRe"+'?key=backBtn';
		reBKForm.submit();
    }

	function exportFile(){
		var reMdForm=document.getElementById("exportFileForm");
	      	reMdForm.action="${ctx}/admin/exportFile";
	       reMdForm.submit();
	}
	
	//window.onload=showField();
</script>

</head>
<!-- <body class="maintable"> -->
<body class="longMaintable">
<div  >
	<div class="dclass_container_header_list">    	
        <div class="dclass_container_title">显示资产</div>
    </div>
    <div class="dclass_container_content">
	<!--内容开始-->
	<form action="" id="listReForm" method="post">
	<table class="dclass_data" id="table1" style="display:block" >
	<!-- <table class="dclass_data" id="table1" style="display:block; table-layout:fixed" > -->
		<thead>
			
			<tr>
				<th align="center">选择<input onClick="if(this.checked==true) { checkAll('delList'); } else { clearAll('delList'); }" type="checkbox" value="" name="test" title="全选/取消"/></div></th>
				<s:if test="dispRe.sequenceNum == 1"><th align="center" ><div class="fixedLength1" >序号</div></th></s:if>
				<s:if test="dispRe.assetsNum == 1"><th align="center" ><div class="fixedLength1" >资产号</div></th></s:if>
				<s:if test="dispRe.selfNum == 1"><th align="center" ><div class="fixedLength1" >自编号</div></th></s:if>
				<s:if test="dispRe.compName == 1"><th align="center" ><div class="fixedLength1" >公司名称</div></th></s:if>
				<s:if test="dispRe.busType == 1"><th align="center" ><div class="fixedLength1" >业务类型</div></th></s:if>
				<s:if test="dispRe.projNum == 1"><th align="center" ><div class="fixedLength1" >项目/工程号</div></th></s:if>
				<s:if test="dispRe.projName == 1"><th align="center" ><div class="fixedLength1" >项目/工程名称</div></th></s:if>
				<s:if test="dispRe.prodType == 1"><th align="center" ><div class="fixedLength1" >资产类型</div></th></s:if>
				<s:if test="dispRe.prodClass == 1"><th align="center" ><div class="fixedLength1" >资产分类</div></th></s:if>
				<s:if test="dispRe.equipClass == 1"><th align="center" ><div class="fixedLength1" >设备分类</div></th></s:if>
				<s:if test="dispRe.equipType == 1"><th align="center" ><div class="fixedLength1" >设备类型</div></th></s:if>
				<s:if test="dispRe.equipName == 1"><th align="center" ><div class="fixedLength1" >设备名称</div></th></s:if>
				<s:if test="dispRe.equipNickName == 1"><th align="center" ><div class="fixedLength1" >设备别名</div></th></s:if>
				<s:if test="dispRe.fiberType == 1"><th align="center" ><div class="fixedLength1" >光缆类型</div></th></s:if>
				<s:if test="dispRe.fiberNum == 1"><th align="center" ><div class="fixedLength1" >光缆芯数</div></th></s:if>
				<s:if test="dispRe.fiberLength == 1"><th align="center" ><div class="fixedLength1" >光缆长度</div></th></s:if>
				<s:if test="dispRe.factoryName == 1"><th align="center" ><div class="fixedLength1" >厂家名</div></th></s:if>
				<s:if test="dispRe.provider == 1"><th align="center" ><div class="fixedLength1" >供货商</div></th></s:if>
				<s:if test="dispRe.equipModel == 1"><th align="center" ><div class="fixedLength1" >设备型号</div></th></s:if>
				<s:if test="dispRe.sn == 1"><th align="center" ><div class="fixedLength1" >S/N</div></th></s:if>
				<s:if test="dispRe.macAddr == 1"><th align="center" ><div class="fixedLength1" >MAC</div></th></s:if>
				<s:if test="dispRe.modelNum == 1"><th align="center" ><div class="fixedLength1" >模块号</div></th></s:if>
				<s:if test="dispRe.standard == 1"><th align="center" ><div class="fixedLength1" >规格</div></th></s:if>
				<s:if test="dispRe.unitPrice == 1"><th align="center" ><div class="fixedLength1" >单价</div></th></s:if>
				<s:if test="dispRe.inputDate == 1"><th align="center" ><div class="fixedLength1" >入库日期</div></th></s:if>
				<s:if test="dispRe.manDate == 1"><th align="center" ><div class="fixedLength1" >出库日期</div></th></s:if>
				<s:if test="dispRe.wareHouseMan == 1"><th align="center" ><div class="fixedLength1" >仓库管理人</div></th></s:if>
				<s:if test="dispRe.useDate == 1"><th align="center" ><div class="fixedLength1" >使用日期</div></th></s:if>
				<s:if test="dispRe.chargeMan == 1"><th align="center" ><div class="fixedLength1" >负责人</div></th></s:if>
				<s:if test="dispRe.assetsMgnt == 1"><th align="center" ><div class="fixedLength1" >资产管理人</div></th></s:if>
				<s:if test="dispRe.equipLocalProvice == 1"><th align="center" ><div class="fixedLength1" >设备所在省</div></th></s:if>
				<s:if test="dispRe.equipLocalCity == 1"><th align="center" ><div class="fixedLength1" >设备所在市</div></th></s:if>
				<s:if test="dispRe.equipLocalDistrict == 1"><th align="center" ><div class="fixedLength1" >设备所在区</div></th></s:if>
				<s:if test="dispRe.equipLocalTown == 1"><th align="center" ><div class="fixedLength1" >设备所在村镇</div></th></s:if>
				<s:if test="dispRe.fiberStart == 1"><th align="center" ><div class="fixedLength1" >光缆起点</div></th></s:if>
				<s:if test="dispRe.fiberEnd == 1"><th align="center" ><div class="fixedLength1" >光缆终点</div></th></s:if>
				<s:if test="dispRe.fiberStartCode == 1"><th align="center" ><div class="fixedLength1" >光缆起始码号</div></th></s:if>
				<s:if test="dispRe.fiberEndCode == 1"><th align="center" ><div class="fixedLength1" >光缆终止码号</div></th></s:if>
				<s:if test="dispRe.exactLocation == 1"><th align="center" ><div class="fixedLength1" >具体位置</div></th></s:if>
				<s:if test="dispRe.belongFrame == 1"><th align="center" ><div class="fixedLength1" >所属机架</div></th></s:if>
				<s:if test="dispRe.localFrame == 1"><th align="center" ><div class="fixedLength1" >所在机框</div></th></s:if>
				<s:if test="dispRe.localChannel == 1"><th align="center" ><div class="fixedLength1" >所在槽道</div></th></s:if>
				<s:if test="dispRe.currStatus == 1"><th align="center" ><div class="fixedLength1" >当前状态</div></th></s:if>
				<%-- <s:if test="dispRe.ip == 1"><th align="center" ><div class="fixedLength1" >IP 地址</div></th></s:if> --%>
				<s:if test="dispRe.equipFunction == 1"><th align="center" ><div class="fixedLength1" >设备功能</div></th></s:if>
				<s:if test="dispRe.modifyDate == 1"><th align="center" ><div class="fixedLength1" >修改日期</div></th></s:if>
				<s:if test="dispRe.modifyResult == 1"><th align="center" ><div class="fixedLength2" >修改原因</div></th></s:if>
				<s:if test="dispRe.remarks == 1"><th align="center" class="long_width" ><div class="fixedLength2" >备注</div></th></s:if>

			</tr>
		</thead>
		<tbody>
			<c:choose>
           	<c:when test="${empty reList}">
	           	<tr>
					<td style="background-color:#ffffff" colspan="2">找不到资产</td>
				</tr>
           	</c:when>
           	<c:otherwise>
           	<s:iterator value="reList" status="status">
				<tr class="list_td" onDblClick="viewDetail(<s:property value='reList[#status.index].sequenceNum'/>)" title="双击以编辑">
				<td align="center"><div><input type="checkbox" value="<s:property value='reList[#status.index].sequenceNum' />" name="delList"/></div></td>
    			<s:if test="dispRe.sequenceNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].sequenceNum"/></div></td></s:if>
    			<s:if test="dispRe.assetsNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].assetsNum"/></div></td></s:if>
    			<s:if test="dispRe.selfNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].selfNum" /></div></td></s:if>
        		<s:if test="dispRe.compName == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].compName" /></div></td></s:if>
        		<s:if test="dispRe.busType == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].busType" /></div></td></s:if>
        		<s:if test="dispRe.projNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].projNum" /></div></td></s:if>
        		<s:if test="dispRe.projName == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].projName" /></div></td></s:if>
        		<s:if test="dispRe.prodType == 1">
        		<td align="center">
        		<div class="fixedLength1" >
        			<s:if test="reList[#status.index].prodType ==1">固定资产</s:if>
        			<s:if test="reList[#status.index].prodType ==2">耗材</s:if>
        		</div></td> </s:if>
        		<s:if test="dispRe.prodClass == 1">
        		<td align="center"><div class="fixedLength1" >
        			<s:if test="reList[#status.index].prodClass ==1">设备</s:if>
        		    <s:if test="reList[#status.index].prodClass ==2">光缆</s:if>
        			<s:if test="reList[#status.index].prodClass ==3">其他</s:if>
        		</div></td></s:if>
        		<s:if test="dispRe.equipClass == 1">
        		<%-- <td align="center">
        			<s:if test="reList[#status.index].equipClass ==1">网络设备</s:if>
        		    <s:if test="reList[#status.index].equipClass ==2">辅助设备</s:if>
        			<s:if test="reList[#status.index].equipClass ==3">其他</s:if>
        		</div></td> --%>
        		<td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipClass" /></div></td>
        		</s:if>
        		<s:if test="dispRe.equipType == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipType" /></div></td></s:if>
        		<s:if test="dispRe.equipName == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipName" /></div></td></s:if>
        		<s:if test="dispRe.equipNickName == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipNickName" /></div></td></s:if>
        		<s:if test="dispRe.fiberType == 1">
        		<td align="center"><div class="fixedLength1" >
        			<s:if test="reList[#status.index].fiberType ==1">主干光缆</s:if>
        		    <s:if test="reList[#status.index].fiberType ==2">引接光缆</s:if>
        			<s:if test="reList[#status.index].fiberType ==3">分支光缆</s:if>
        			<s:if test="reList[#status.index].fiberType ==4">其他</s:if>
        		</div></td></s:if>
        		<s:if test="dispRe.fiberNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberNum" /></div></td></s:if>
        		<s:if test="dispRe.fiberLength == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberLength" /></div></td></s:if>
        		<s:if test="dispRe.factoryName == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].factoryName" /></div></td></s:if>
        		<s:if test="dispRe.provider == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].provider" /></div></td></s:if>
        		<s:if test="dispRe.equipModel == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipModel" /></div></td></s:if>
        		<s:if test="dispRe.sn == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].sn" /></div></td></s:if>
        		<s:if test="dispRe.macAddr == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].macAddr" /></div></td></s:if>
        		<s:if test="dispRe.modelNum == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].modelNum" /></div></td></s:if>
        		<s:if test="dispRe.standard == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].standard" /></div></td></s:if>
        		<!-- Permission added by Doug on Oct17 -->
        		<rbac:hasPermission permStr="/admin/price">
        		<s:if test="dispRe.unitPrice == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].unitPrice" /></div></td></s:if>
        		</rbac:hasPermission>
        		<%-- <s:if test="dispRe.unitPrice == 1"><td align="center"><div class="fixedLength1" ><s:property value="getText('{0,number,#,##0.00}',{reList[#status.index].unitPrice})" /></div></td></s:if> --%>        		
        	    <%-- <s:if test="dispRe.unitPrice == 1"><td align="center"><div class="fixedLength1" ><s:text name="format.money"><s:param value="reList[#status.index].unitPrice"/></s:text></div></td></s:if> --%>
        	    <%-- <s:if test="dispRe.unitPrice == 1"><td align="center"><div class="fixedLength1" ><s:property value="%{getText('{0,number,$##0.00}',{reList[#status.index].unitPrice})}" /></div></td></s:if> --%>
        		<s:if test="dispRe.inputDate == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].inputDate" /></div></td></s:if>
        		<s:if test="dispRe.manDate == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].manDate" /></div></td></s:if>
        		<s:if test="dispRe.wareHouseMan == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].wareHouseMan" /></div></td></s:if>
        		<s:if test="dispRe.useDate == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].useDate" /></div></td></s:if>
        		<s:if test="dispRe.chargeMan == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].chargeMan" /></div></td></s:if>
        		<s:if test="dispRe.assetsMgnt == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].assetsMgnt" /></div></td></s:if>
        		<s:if test="dispRe.equipLocalProvice == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipLocalProvice" /></div></td></s:if>
        		<s:if test="dispRe.equipLocalCity == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipLocalCity" /></div></td></s:if>
        		<s:if test="dispRe.equipLocalDistrict == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipLocalDistrict" /></div></td></s:if>
        		<s:if test="dispRe.equipLocalTown == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipLocalTown" /></div></td></s:if>
        		<s:if test="dispRe.fiberStart == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberStart" /></div></td></s:if>
        		<s:if test="dispRe.fiberEnd == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberEnd" /></div></td></s:if>
        		<s:if test="dispRe.fiberStartCode == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberStartCode" /></div></td></s:if>
        		<s:if test="dispRe.fiberEndCode == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].fiberEndCode" /></div></td></s:if>
        		<s:if test="dispRe.exactLocation == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].exactLocation" /></div></td></s:if>
        		<s:if test="dispRe.belongFrame == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].belongFrame" /></div></td></s:if>
        		<s:if test="dispRe.localFrame == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].localFrame" /></div></td></s:if>
        		<s:if test="dispRe.localChannel == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].localChannel" /></div></td></s:if>
        		<s:if test="dispRe.currStatus == 1">
        		<td align="center"><div class="fixedLength1" >
        			<s:if test="reList[#status.index].currStatus ==1">正常使用</s:if>
        		    <s:if test="reList[#status.index].currStatus ==2">故障</s:if>
        			<s:if test="reList[#status.index].currStatus ==3">拆除</s:if>
        			<s:if test="reList[#status.index].currStatus ==4">正在维修</s:if>
        			<s:if test="reList[#status.index].currStatus ==5">库存备用</s:if>
        			<s:if test="reList[#status.index].currStatus ==6">报废</s:if>
        			<s:if test="reList[#status.index].currStatus ==7">借出</s:if>
        			<s:if test="reList[#status.index].currStatus ==8">借入</s:if>
        		</div></td></s:if>
        		<%-- <s:if test="dispRe.ip == 1"><td align="center"><s:property value="reList[#status.index].ip" /></div></td></s:if> --%>
        		<s:if test="dispRe.equipFunction == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].equipFunction" /></div></td></s:if>
        		<s:if test="dispRe.modifyDate == 1"><td align="center"><div class="fixedLength1" ><s:property value="reList[#status.index].modifyDate" /></div></td></s:if>
        		<s:if test="dispRe.modifyResult == 1"><td align="center" ><div class="fixedLength2" ><s:property value="reList[#status.index].modifyResult" /></div></td></s:if>
        		<s:if test="dispRe.remarks == 1"><td align="center" class="long_width" ><div class="fixedLength2" ><s:property value="reList[#status.index].remarks" /></div></td></s:if>		 			
        	</tr>
        	</s:iterator>	
           	</c:otherwise>
           </c:choose>
		</tbody>
	</table>
	</form>
	
	<!-- Added by Doug for returnBack support -->
	<!-- <form action="" id="emptyForm" method="post">
	</form>-->
	
	<form name="exportFileForm" method="POST" id="exportFileForm"
		action="exportFile" enctype="multipart/form-data">
	</form>
	
	<div class="dclass_pager">
        <c:choose>
        	<c:when test="${empty reList}">共 0页  第0页   共0条记录</c:when>
        	<c:otherwise><c:import url="/admin/common/page3.jsp"></c:import></c:otherwise>
        </c:choose>
	</div>
	
	<div style="padding: 0.3em; text-align: center">
			<rbac:hasPermission permStr="/admin/create">
				<input id="confirmExport" type="button" class="button" value="批量输出" onclick="javascript:exportFile();" />
			</rbac:hasPermission>
			<rbac:hasPermission permStr="/admin/batch">
				<input type="button" class="button" value="删除所选" onclick="javascript:delSelect();" />
			</rbac:hasPermission>
			
    		<!-- Added by Doug for 'return' btn -->
    		<!-- <input type="button" class="button" value="返回" onclick="javascript:history.back();" /> -->
    		<input type="button" class="button" value="返回" onclick="window.location='${ctx}/admin/filterRe'" />
	</div>
	<!--内容结束-->
</div>
</div>
</body>
</html>